/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: HP
 * Date: 2023 -03 -06
 * Time: 12:07
 */

import java.math.*;
import java.util.Scanner;

public class Test {
    public static boolean primeNumber(int n) {
        for (int i = 2; i <= (int) Math.sqrt(n); i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static void printPrime() {
        for (int i = 2; i <= 100; i++) {
            if (primeNumber(i)) System.out.print(i + " ");
        }
    }

    public static void leapYear() {
        for (int i = 1000; i <= 2000; i++) {
            if ((i % 100 != 0 && i % 4 == 0) || i % 400 == 0) {
                System.out.print(i + " ");
            }
        }
    }

    public static void cntNine() {
        int cnt = 0;
        for (int i = 1; i <= 100; i++) {
            int tmp = i;
            while (tmp != 0) {
                if (tmp % 10 == 9) {
                    cnt++;
                }
                tmp /= 10;
            }
        }
        System.out.println(cnt);
    }

    public static void MutilTable(int n) {
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(i + " * " + j + " = " + i * j+" ");
            }
            System.out.println();
        }
    }
    public static void printNumber(int n){
        while(n!=0){
            System.out.println(n%10);
            n/=10;
        }
    }
    public static String password="123456";
    public static boolean login(){
        Scanner sc=new Scanner(System.in);
        boolean flg=false;
//        System.out.print("Please input password:");
        for (int i = 0; i < 3; i++) {
            System.out.print("Please input password:");
            String pw=sc.nextLine();
            if(pw.equals(password)){
                System.out.println("login success...");
                flg=true;
                break;
            }else{
                System.out.println("password error...");
            }
        }
        return flg;
    }
    public static void printBinary(int n){
        for (int i = 31; i >=0; i--) {
            if((i%2==1)&&((n>>i)&1)!=0) System.out.print(1);
            else System.out.print("0");
        }
        System.out.println();
        for (int i = 31; i >=0; i--) {
            if((i%2==0)&&((n>>i)&1)!=0) System.out.print(1);
            else System.out.print("0");
        }
        System.out.println();
    }
    public static void main(String[] args) {
        //leapYear();
//        cntNine();
//        MutilTable(9);
//        System.out.println(login());
//        printNumber(12443);
        printBinary(438590);
    }
}
